<head>
  <meta name="layout" content="main"/>
  <title><g:message code="register.show.title" default="User Profile"/></title>
</head>

<body>
  <div class="nav">
    <span class="menuButton">
      <g:link class="list" action="account" controller="player" id="${person.id}"><g:message code="button.myAccount" default="My Account"/></g:link>
    </span>
  </div>

  <div class="body">
    <h1><g:message code="register.show.title" default="User Profile"/></h1>
    <g:if test="${flash.message}">
      <div class="message">${flash.message}</div>
    </g:if>
    <div class="dialog">
      <table>
        <tbody>

          <tr class="prop">
            <td valign="top" class="name"><g:message code="register.id" default="Login Name"/>:</td>
            <td valign="top" class="value">${person.username?.encodeAsHTML()}</td>
          </tr>

          <tr class="prop">
            <td valign="top" class="name"><g:message code="register.fullName" default="Full Name"/>:</td>
            <td valign="top" class="value">${person.userRealName?.encodeAsHTML()}</td>
          </tr>

          <tr class="prop">
            <td valign="top" class="name"><g:message code="player.position" default="Position"/>:</td>
            <td valign="top" class="value">${person.position?.encodeAsHTML()}</td>
          </tr>


          <tr class="prop">
            <td valign="top" class="name"><g:message code="register.enabled" default="Enabled"/>:</td>
            <td valign="top" class="value">${person.enabled}</td>
          </tr>

          %{--<tr class="prop">
                  <td valign="top" class="name"><g:message code="register.email" default="Email"/>:</td>
                  <td valign="top" class="value">${person.email?.encodeAsHTML()}</td>
              </tr>--}%

          %{--<tr class="prop">
                  <td valign="top" class="name"><g:message code="register.showEmail" default="Show Email"/>:</td>
                  <td valign="top" class="value">${person.emailShow}</td>
              </tr>--}%

          <tr class="prop">
            <td valign="top" class="name"><g:message code="register.receiveEmail" default="Receive Email"/>:</td>
            <td valign="top" class="value">${person.receiveEmail}</td>
          </tr>

          <tr class="prop">
            <td valign="top" class="name"><g:message code="player.roles" default="Roles"/>:</td>
            <td valign="top" class="value">
              <ul>
                <g:each var='authority' in="${person.authorities}">
                  <li>${authority.description}</li>
                </g:each>
              </ul>
            </td>
          </tr>

        </tbody>
      </table>
    </div>

    <div class="buttons">
      <g:form>
        <input type="hidden" name="id" value="${person.id}"/>
        <span class="button"><g:actionSubmit class='edit' value="${message(code:'button.edit', 'default':'Edit')}" action="edit"/></span>
      </g:form>
    </div>

  </div>
</body>
